module ToHit;

class ToHit {
	protected static immutable ubyte[10][10] uba_chart = [
		[4, 4, 5, 6, 6, 6, 6, 6, 6, 6],
		[3, 4, 4, 4, 5, 5, 6, 6, 6, 6],
		[2, 3, 4, 4, 4, 4, 5, 5, 5, 6],
		[2, 3, 3, 4, 4, 4, 4, 4, 5, 5],
		[2, 3, 3, 3, 4, 4, 4, 4, 4, 4],
		[2, 3, 3, 3, 3, 4, 4, 4, 4, 4],
		[2, 3, 3, 3, 3, 3, 4, 4, 4, 4],
		[2, 2, 3, 3, 3, 3, 3, 4, 4, 4],
		[2, 2, 2, 3, 3, 3, 3, 3, 4, 4],
		[2, 2, 2, 2, 3, 3, 3, 3, 3, 4]];
	public ubyte get(ubyte attacker, ubyte defender) {
		return uba_chart[attacker-1][defender-1];
	}
}

